import common from "./common";

export default {

    addCommands() {
        Cypress.Commands.add("visitMenu",
            {
                prevSubject: 'optional'
            },
            (subject: Cypress.Chainable<any>, menus: string[]): void => {
                for (var i = 0; i < menus.length; i++) {
                    common.selectNode(subject, "button:contains('" + menus[i] + "')").click();
                }
            });
    }

}
